package com.vip.admin.modules.system.service.impl;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vip.admin.modules.system.entity.SysRole;
import com.vip.admin.modules.system.mapper.SysRoleMapper;
import com.vip.admin.modules.system.service.ISysRoleService;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 袜子离不开秋裤
 * @since 2020-01-08
 */
@Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements ISysRoleService {

	@Autowired
	SysRoleMapper sysRoleMapper;

	@Override
	public Set<String> getUserRolesSet(String username) {
		List<String> roleString = sysRoleMapper.getRoleByUserName(username);
		return new HashSet<String>(roleString);
	}

}
